<?php
/**
 * Created by yaoyu.
 * User: Administrator
 * Date: 2020/4/1
 * Time: 13:41
 */

namespace App\Http\Controllers;


use App\Model\Invest;
use App\Model\Team;

class CompanyController extends Controller
{
    /**
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
     */
    public function team()
    {
        $teams = Team::orderby('id', 'desc')->paginate(9);
        return view('company.team', compact('teams'));
    }

    /**
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
     */
    public function invest()
    {
        $invest = Invest::orderby('id', 'desc')->paginate(9);
        return view('company.invest', compact('invest'));
    }

    /**
     * @param $id
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
     */
    public function show($id)
    {
        $team = Team::findOrFail($id);
        return view('company.show',compact('team'));
    }
}